Skip to content

fix(frontend): add engines field to package.json for Node.js and pnpm version requirements#2751

Open
unn-Known1 wants to merge 1 commit intobytedance:mainfrom
unn-Known1:fix/issue-76-add-engines-field
Open

fix(frontend): add engines field to package.json for Node.js and pnpm version requirements#2751
unn-Known1 wants to merge 1 commit intobytedance:mainfrom
unn-Known1:fix/issue-76-add-engines-field

Conversation

@unn-Known1
Copy link
Copy Markdown

Summary

This PR adds the engines field to frontend/package.json to specify minimum version requirements for Node.js and pnpm, addressing issue #76.

Problem

Without explicit engine requirements, developers might use incompatible Node.js or pnpm versions, leading to:

  • Lock-file version mismatches
  • Unexpected dependency resolution issues
  • Problems parsing certain files (as reported in the original issue)

Solution

Added the following to package.json:

"engines": {
  "node": ">=20",
  "pnpm": ">=10"
}

These versions align with:

  • packageManager field which specifies pnpm@10.26.2
  • Modern Next.js features requiring Node.js 20+

Testing

  • JSON is valid (verified with jq)
  • pnpm install --frozen-lockfile succeeds
  • pnpm format check passes
  • Minimal change (only package.json modified)

Note

This contribution was developed with AI assistance.

… version requirements

Addresses issue bytedance#76 by adding explicit engine requirements:
- Node.js >=20 (required for modern Next.js features)
- pnpm >=10 (required as specified in packageManager)

This prevents installation issues with older versions that may cause
unexpected problems like lock-file version mismatches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant